package com.info.zhiduoduo.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * @author tianyonghong
 * @create 2022/12/14
 */
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy ={PhoneValidator.class})
public @interface IdCard {
    String message() default "请输入正确的身份证号";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
